import React from 'react'
import {View, ViewStyle, StyleSheet} from 'react-native'
import {themeColors} from 'styles'

const Division: React.FC<{isVertical?: boolean; style?: ViewStyle}> = props => {
  return (
    <View
      style={[props.style, styles.division, props.isVertical ? styles.vertical : styles.horizontal]}
    />
  )
}

interface DivisionStyle {
  division: ViewStyle
  horizontal: ViewStyle
  vertical: ViewStyle
}

const styles = StyleSheet.create<DivisionStyle>({
  division: {
    backgroundColor: themeColors.divider,
  },
  horizontal: {
    width: '100%',
    height: 1,
  },
  vertical: {
    width: 1,
    height: '100%',
  },
})

export default Division
